package nuc.edu.wcy.controller;

import nuc.edu.wcy.entity.Account;
import nuc.edu.wcy.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class AccountController {
    @Autowired
    IAccountService accountService;

    @RequestMapping("/aa")
    String aa(){
        System.out.println(accountService.find());
        return "aa";
    }

    @RequestMapping("/json")
    @ResponseBody
    List<Account> json01(){
        return accountService.find();
    }

}
